test("Plugin Config",function(){
	
	expect( 15 );
	
	// abstract the name of the plugin
	var plugin = "plugin_test3", 
	// local variables to track function calls
	prepared = 0, created = 0, disabled = 0, 
	// elements to instantiate the plugin
	$div = jQuery('<div></div>'),
	$span = jQuery('<span></span>'),
	// configure the plugin
	config = {
		prepare: function(){
			prepared += 1;
			},
		create: function( elem ){
			created += 1;
			if ( $( elem ).is('span') ) 
				return false;
			
			},
		destroy: function(){
			created -= 1;
			},
		disable: function( arg ){
			disabled += arg ? 1 : -1;
			}
		};
	
	// create the plugin, check counts
	ok( jQuery.ux( plugin, config ), "plugin created successfully");
	equals( prepared, 0, "plugin config.prepare was not called" );
	equals( created, 0, "plugin config.create was not called" );
	
	// create an invalid instance, check counts
	ok( !$span[ plugin ]().is(':'+ plugin ), "plugin instance suppressed");
	equals( prepared, 1, "plugin config.prepare was called" );
	equals( created, 1, "plugin config.create was called" );
	
	// create an instance, check counts
	ok( $div[ plugin ]().is(':'+ plugin ), "plugin instance created");
	equals( prepared, 2, "plugin config.prepare was called" );
	equals( created, 2, "plugin config.create was called" );
	
	// disable the plugin instance
	ok( $div.ux( plugin +".disable").is(':'+ plugin ), "plugin instance disabled");
	equals( disabled, 1, "plugin config.disable was called" );
	
	// enable the plugin instance
	ok( $div.ux( plugin +".enable").is(':'+ plugin ), "plugin instance enabled");
	equals( disabled, 0, "plugin config.disable was called" );
	
	// destroy the plugin instance
	ok( !$div.ux( plugin +".destroy").is(':'+ plugin ), "plugin instance destroyed");
	equals( created, 1, "plugin config.destroy was called" );
	
	// cleanup for other tests
	jQuery.ux( plugin, false );
	});